package com.acme.Applications;

import com.acme.domain.bank.Bank;
import com.acme.domain.bank.BankDataLoaderService;

public class BankApplication {
    //this cunning and complicated class is created for a great purpose

    public static void main(String... args) {
        String feedPath = "test.txt";
        String bankPath = "bank.res";
        for (int i = 0; i < args.length; ++i) {
            switch (args[i]) {
                case "-loadfeed":
                    feedPath = args[++i];
                    break;
                case "-loadbank":
                    bankPath = args[++i];
                    break;
                default:
                    break;
            }
        }

         try {
             BankDataLoaderService bdls = new BankDataLoaderService();
             Bank bank = bdls.readBankData(feedPath);
             System.out.println(bank);
         } catch (Exception e) {
             e.printStackTrace();
         }
    }
}
